#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
uchar a;
void delayms(uint xms)
{
uint i,j;
for(i=xms;i>0;i--)
for(j=110;j>0;j--);
}
void main()
{
	P0=0xfe;
	while(1)
	{
	a=P0;
	a=a<<1;
	a=a|0x0l;
	delayms(500);
	if(a==0xff)
	a=0xfe;
	P0=a;
	}
}
